package Demo;


import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

public class Demo01 {
    public static void main(String[] args) throws InterruptedException {
        //BlockingQueue<String> q = new ArrayBlockingQueue<>(10);
        BlockingQueue<String> queue = new LinkedBlockingQueue<>(1000);
        queue.take();
        queue.put("hello");
        System.out.println(queue.take());


    }
}
